<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%order}}".
 *
 * @property integer $id
 * @property integer $customer_id
 * @property string $customer_name
 * @property integer $user_id
 * @property string $user_name
 * @property integer $create_time
 * @property integer $flag
 */
class Order extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%order}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['customer_id', 'customer_name', 'user_id', 'user_name', 'create_time'], 'required'],
            [['customer_id', 'user_id', 'create_time', 'flag'], 'integer'],
            [['customer_name', 'user_name'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'customer_id' => 'Customer ID',
            'customer_name' => 'Customer Name',
            'user_id' => 'User ID',
            'user_name' => 'User Name',
            'create_time' => 'Create Time',
            'flag' => 'Flag',
        ];
    }
}
